-- GENERATED SPELL FOR [Brother Ravenoak] --


function spell0_5915(pUnit, Event) --@Bear Form,Self--
pUnit:FullCastSpellOnTarget(7090,pUnit)
pUnit:RegisterEvent('Sorts_5915', 0, 1)
end

function spell1_5915(pUnit, Event) --@Low Swipe,n/a--
pUnit:FullCastSpellOnTarget(8716,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5915', 12290, 1)
end

function spell2_5915(pUnit, Event) --@Maul,n/a--
pUnit:FullCastSpellOnTarget(12161,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5915', 565, 1)
end

function spell3_5915(pUnit, Event) --@Rejuvenation,n/a--
pUnit:FullCastSpellOnTarget(2090,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5915', 12000, 1)
end

function Sorts_5915(pUnit, Event)
local choix_sorts_5915 = math.random(0, 3)
if choix_sorts_5915 == 0 then
pUnit:RegisterEvent('spell0_5915', 1, 1)
end
if choix_sorts_5915 == 1 then
pUnit:RegisterEvent('spell1_5915', 1, 1)
end
if choix_sorts_5915 == 2 then
pUnit:RegisterEvent('spell2_5915', 1, 1)
end
if choix_sorts_5915 == 3 then
pUnit:RegisterEvent('spell3_5915', 1, 1)
end
end

function mob5915_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5915', math.random(1500, 3000), 1)
end

function mob5915_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5915_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5915_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5915, 1, 'mob5915_Action')
RegisterUnitEvent(5915, 2, 'mob5915_Leave')
RegisterUnitEvent(5915, 3, 'mob5915_Kill')
RegisterUnitEvent(5915, 4, 'mob5915_Die')
